//
//  LoanSuccessViewController.m
//
//
//  Created by gynjobs on 2017/8/14.
//  Copyright © 2017年 gynjobs. All rights reserved.
//

#import "LoanSuccessViewController.h"

static NSInteger loan_step = 2;


@interface LoanSuccessViewController ()

@end

@implementation LoanSuccessViewController

-(instancetype)init{
    
    if(self = [super init]){
        
        // to do
        _score = 0;
    }
    
    return self;
}

-(void)loadView{
    [super loadView];
    
    _mainView = [[loanSuccessView
                  alloc] init];
    self.view = _mainView;
    self.title = @"申请贷款";
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.mainView.processView setProcess:loan_step];
    self.self.mainView.processView.successLabel.text = [NSString stringWithFormat:@"贷款申请成功率提高%ld%%",(long)self.score];
    [self.mainView.finishBtn addTarget:self action:@selector(finishBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//- (void)backBtnPressed:(id) sender{
//    
//    [self.navigationController popToRootViewControllerAnimated:YES];
//    
//}
//



#pragma mark finishBtn Pressed

-(void)finishBtnClick:(id)sender{
    
    [self.navigationController popToRootViewControllerAnimated:YES];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
